-- GENERATED SPELL FOR [Baron Rivendare] --


function spell0_29109(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29109', 655, 1)
end

function spell1_29109(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29109', 5343, 1)
end

function spell2_29109(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(17393,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29109', 2000, 1)
end

function spell3_29109(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(17434,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29109', 2000, 1)
end

function spell4_29109(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(17435,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29109', 2000, 1)
end

function Sorts_29109(pUnit, Event)
local choix_sorts_29109 = math.random(0, 4)
if choix_sorts_29109 == 0 then
pUnit:RegisterEvent('spell0_29109', 1, 1)
end
if choix_sorts_29109 == 1 then
pUnit:RegisterEvent('spell1_29109', 1, 1)
end
if choix_sorts_29109 == 2 then
pUnit:RegisterEvent('spell2_29109', 1, 1)
end
if choix_sorts_29109 == 3 then
pUnit:RegisterEvent('spell3_29109', 1, 1)
end
if choix_sorts_29109 == 4 then
pUnit:RegisterEvent('spell4_29109', 1, 1)
end
end

function mob29109_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29109', math.random(1500, 3000), 1)
end

function mob29109_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29109_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29109_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29109, 1, 'mob29109_Action')
RegisterUnitEvent(29109, 2, 'mob29109_Leave')
RegisterUnitEvent(29109, 3, 'mob29109_Kill')
RegisterUnitEvent(29109, 4, 'mob29109_Die')
